package com.huawei.appmarket.framework.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import androidx.annotation.AttrRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.huawei.appgallery.foundation.ui.css.CSSDeclaration;
import com.huawei.appgallery.foundation.ui.css.CSSRule;
import com.huawei.appgallery.foundation.ui.css.CSSViewProxy;
import com.huawei.appgallery.foundation.ui.css.RenderListener;
import com.huawei.appmarket.framework.widget.RenderImageView.b;

public class RenderFrameLayout extends FrameLayout implements RenderListener {
    private b ˏ;

    public RenderFrameLayout(@NonNull Context context) {
        super(context);
    }

    public RenderFrameLayout(@NonNull Context context, @Nullable AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public RenderFrameLayout(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i) {
        super(context, attributeSet, i);
    }

    public boolean onRenderReady(CSSViewProxy cSSViewProxy) {
        CSSRule rule = cSSViewProxy.getRule();
        if (rule.getStyleDeclaration() == null) {
            return false;
        }
        CSSDeclaration styleDeclaration = rule.getStyleDeclaration();
        if (styleDeclaration == null) {
            return false;
        }
        if (this.ˏ != null) {
            return this.ˏ.ˋ(styleDeclaration);
        }
        return true;
    }

    public void setListener(b bVar) {
        this.ˏ = bVar;
    }
}
